package com.example.langchain4j.config;

import dev.langchain4j.model.chat.ChatLanguageModel;
import dev.langchain4j.model.chat.StreamingChatLanguageModel;
import dev.langchain4j.model.ollama.OllamaChatModel;
import dev.langchain4j.model.ollama.OllamaStreamingChatModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AIconfig {

    @Bean("chatModel")
    public ChatLanguageModel getChatmodel() {
        return OllamaChatModel.builder().baseUrl("http://localhost:11434").modelName("gemma:2b").build();
    }

    @Bean("streamingChatModel")
    public StreamingChatLanguageModel getStreamingChatModel() {
        return OllamaStreamingChatModel.builder().baseUrl("http://localhost:11434").modelName("qwen2:7b").build();
    }

}
